Skip to main content

Interface: BasePeerConnection

Hierarchy

Properties

answerOptions

answerOptions: undefined | RTCAnswerOptions


bandwidth

bandwidth: number


close

close: () => void

Type declaration

▸ (): void

Returns

void


configs

configs: MediaConfig[]


connectionState

connectionState: RTCPeerConnectionState


createDataChannel

createDataChannel: (label: string, dataChannelDict?: RTCDataChannelInit) => RTCDataChannel

Type declaration

▸ (label, dataChannelDict?): RTCDataChannel

Parameters
NameType
labelstring
dataChannelDict?RTCDataChannelInit
Returns

RTCDataChannel


getConfiguration

getConfiguration: () => RTCConfiguration

Type declaration

▸ (): RTCConfiguration

Returns

RTCConfiguration


getDataChannelConfigs

getDataChannelConfigs: () => DataChannelConfig[]

Type declaration

▸ (): DataChannelConfig[]

Returns

DataChannelConfig[]


getTransceiverConfigs

getTransceiverConfigs: () => TransceiverConfig[]

Type declaration

▸ (): TransceiverConfig[]

Returns

TransceiverConfig[]


hasICECandidates

hasICECandidates: boolean


iceConnectionState

iceConnectionState: RTCIceConnectionState


iceGatheringState

iceGatheringState: RTCIceGatheringState


offerOptions

offerOptions: undefined | RTCOfferOptions


peer

peer: ExtendedRTCPeerConnection


polite

polite: boolean


receivers

receivers: RTCRtpReceiver[]


references

references: References

Reference of any logical associations to the peer connection for logging


restartIce

restartIce: () => void

Type declaration

▸ (): void

Returns

void


senders

senders: RTCRtpSender[]


setConfiguration

setConfiguration: undefined | (configuration?: RTCConfiguration) => void

Only recently supported on some browser: https://caniuse.com/?search=setconfiguration


signalingState

signalingState: RTCSignalingState

Methods

getStats

getStats(selector?): Promise<RTCStatsReport>

Parameters

NameType
selector?null | MediaStreamTrack

Returns

Promise<RTCStatsReport>


setLocalStream

setLocalStream(stream, target): Promise<void>

Parameters

NameType
streamundefined | MediaStream
targetTransceiverConfigDirectionTuple[]

Returns

Promise<void>


setReference

setReference(key, value): void

Key/Value pair for referencing logical associations for logging

Parameters

NameTypeDescription
keystringThe key for the reference
valuestringThe value for the reference

Returns

void